A viewport is a polygonal-viewing region of a 3D scene that is rendered into a 2D image corresponding to a target area of a graphical display screen. A GPU may include one or more graphics pipelines to render a three-dimensional (3D) scene into a two-dimensional (2D) scene. Clipping may be one technique that is used to selectively enable or disable rendering operations within a defined region of interest (i.e., a target area) of a 3D scene. A clip-cull-viewpoint (CCV) unit within a CCV pipeline of a GPU typically provides clipping, culling (when required), and viewport transformations for rendering a 3D scene into a 2D scene. A primitive within a defined region of interest may be culled and the primitive is then not fetched, transformed, rasterized, or shaded if a graphic object associated with the primitive is determined to be invisible in the corresponding 2D scene.
A CCV unit may receive input primitives from a stream-out (SO) unit. A primitive received from the SO unit may be part of a stream of triangles in which two consecutive triangles may share one or two vertices. The CCV unit may clip, cull and/or transform a primitive based on a viewport, and send the result to a downstream destination unit, such as a binding (BIN) unit or a set-up (SU) unit.
A conventional approach to reduce data traffic through a CCV unit involves implementing two index caches (e.g., two 8-entry caches) in the CCV unit in which the first index cache is for the primitives received by the CCV unit and the second index cache is for primitives that are sent to the BIN unit (or the SU unit) to store the vertices that are shared between primitives in order to avoid re-sending the shared vertices to the BIN unit (or the SU unit). A similar cache may be implemented in the BIN unit (or the SU unit). If some primitives are culled, each vertex of a surviving primitive is compared against the corresponding index cache in the CCV unit to determine whether the vertex has been previously sent to the BIN unit (or the SU unit). This conventional approach uses a significant amount of memory space and has a relatively high power consumption.